mypow n = n^n
mysum = (foldr (+) 0) . (map mypow)
main = mysum [1..1000]
